/*
 * BlackLightning.(UITypeEditors)
 * Andy Tidball
 * 
 * Project: Black Lightning
 * Copyright: GNU General Public License
 */

using System;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace BlackLightning {
	/// <summary>
	/// A visual editor for editing the Launcher path.
	/// </summary>
	internal class LauncherPathTypeEditor : FileNameEditor {
		protected override void InitializeDialog(OpenFileDialog OFD) {
			base.InitializeDialog(OFD);
			OFD.Filter = "Simutronics Launcher (Launcher.exe)|Launcher.exe";
			OFD.Title = "Locate Simutronics Launcher";
		}
	}
	
	/// <summary>
	/// A visual editor for editing the Next Tool path.
	/// </summary>
	internal class NextToolPathTypeEditor : FileNameEditor {
		protected override void InitializeDialog(OpenFileDialog OFD) {
			base.InitializeDialog(OFD);
			OFD.Filter = "Lich (Lich.exe)|Lich.exe|PsiNet (PsiNet.exe)|PsiNet.exe|Applications (*.exe)|*.exe";
			OFD.Title = "Locate Next Tool";
			OFD.FilterIndex = 2;
			switch (OFD.FileName.ToLower()) {
				case "lich.exe":   OFD.FilterIndex = 0; break;
				case "psinet.exe": OFD.FilterIndex = 1; break;
			}
		}
	}
}